package com.ruijixiang.leetcode.hot100;

import java.util.Arrays;

public class leetcode0035 {

    // 需要使用二分法来写
    public int searchInsert(int[] nums,int target){
        int idx= Arrays.binarySearch(nums,target);
        return idx>=0 ? idx : -idx-1;
    }
}
